/**
** Created by Kstar on 2022/1/12.
**/

//

#ifndef HELLOWORLD_ANIMAL_H
#define HELLOWORLD_ANIMAL_H


#include "Creature.h"

#define debug(a) cout<<(a)<<endl;
#define debug2(a, b) cout<<(a)<<","<<(b)<<endl;
#define debug3(a, b, c) cout<<(a)<<","<<(b)<<","<<(c)<<endl;


class Animal : virtual public Creature {
private:
    //动物运动速度，植物就没有啦
    int speed;

    int sex;

    //攻击力
    int atk;

    //生命值
    int life;

    //耐力
    int endurance;
public:
    int getSpeed();

    void setSpeed(int cspeed);

    int getSex();

    void setSex(int csex);

    int getAtk();

    void setAtk(int catk);

    int getLife();

    //直接设置生命值
    void setLife(int clife);

    //生命值加减
    void addLife(int step);

    void decLife(int step);

    int getEndurance();

    void setEndurance(int cendurance);

    Animal(int cx,int cy,int cTime,int cspeed, int csex,int catk,int clife,int cendurance);

    Animal();


    //攻击函数，人遇到动物的时候会调用
    void attack(Animal &animal);

    //移动函数，dir分为上下左右1234，time为运动的时间
    void move(int dir,int time);



};


#endif //HELLOWORLD_ANIMAL_H
